import { _decorator, Component, Node, Event } from 'cc'
import EventManager from '../../Runtime/EventManager'
import { CONTROLLER_ENUM, EVENT_ENUM } from '../../Enum'
const { ccclass, property } = _decorator

/**
 * Predefined variables
 * Name = NewComponent
 * DateTime = Thu Jul 07 2022 15:15:20 GMT+0800 (中国标准时间)
 * Author = Zero_Y
 * FileBasename = ControllerManager.ts
 * FileBasenameNoExtension = ControllerManager
 * URL = db://assets/Scripts/UI/NewComponent.ts
 * ManualUrl = https://docs.cocos.com/creator/3.4/manual/zh/
 *
 */

@ccclass('ControllerManager')
export class ControllerManager extends Component {
  handleCtrl(event: Event, type: string) {
    EventManager.Instance.emit(EVENT_ENUM.PLAY_CTRL, type as CONTROLLER_ENUM)
  }
}
